package com.umeng.fb;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;

public class b
  implements Comparable<b>
{
  public String a = b.class.getSimpleName();
  public a b = a.d;
  public String c;
  public a d;
  public a e;
  public List<a> f = new ArrayList();

  public b(JSONArray paramJSONArray)
    throws Exception
  {
    int i = 0;
    if (i >= paramJSONArray.length())
      if (!(this.f.isEmpty()))
      {
        this.d = ((a)this.f.get(0));
        this.e = ((a)this.f.get(-1 + this.f.size()));
        this.c = this.d.c;
        if (this.f.size() == 1)
        {
          if (((a)this.f.get(0)).g != a.a.b)
            break label208;
          this.b = a.b;
        }
      }
    label192: label208: 
    do
      while (true)
      {
        return;
        try
        {
          a locala = new a(paramJSONArray.getJSONObject(i));
          if (locala.g == a.a.b)
            this.b = a.c;
          this.f.add(locala);
          ++i;
        }
        catch (JSONException localJSONException)
        {
          localJSONException.printStackTrace();
          break label192:
        }
      }
    while (((a)this.f.get(0)).g != a.a.a);
    this.b = a.a;
  }

  public int a(b paramb)
  {
    Date localDate1 = this.e.e;
    Date localDate2 = paramb.e.e;
    if ((localDate2 == null) || (localDate1 == null) || (localDate1.equals(localDate2)))
      return 0;
    if (localDate1.after(localDate2))
      return -1;
    return 1;
  }

  public a a(int paramInt)
  {
    if ((paramInt < 0) || (paramInt > -1 + this.f.size()))
      return null;
    return ((a)this.f.get(paramInt));
  }

  public void b(int paramInt)
  {
    if ((paramInt < 0) || (paramInt > -1 + this.f.size()))
      return;
    this.f.remove(paramInt);
  }

  public static enum a
  {
    static
    {
      a[] arrayOfa = new a[4];
      arrayOfa[0] = a;
      arrayOfa[1] = b;
      arrayOfa[2] = c;
      arrayOfa[3] = d;
      e = arrayOfa;
    }
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     com.umeng.fb.b
 * JD-Core Version:    0.5.2
 */